package com.share.bean.attach.advertise;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * <p>Title：广告版位列表</p>
 * <p>Description：</p>
 * @Author：杨浩泉
 * @Date：2010-4-23
 */
@Entity
@Table(name="share_adPositionItem")
public class PositionItem {

	/** 版位列表ID */
	private int piId ;
	
	/** 版位列表名称 */
	private String piName ;
	
	/** 版位列表宽度（像素） */
	private int piWidth ;
	
	/** 版位列表高度（像素） */
	private int piHeight ;
	
	/** 版位列表描述 */
	private String piDesc ;
	
	/** 版位列表与版位分类多对一关联关系 */
	private PositionSort adPS ;
	
	/** 版位列表与广告列表一对多关联关系 */
	private Set<Advertise> advertisement ;

	@OneToMany(mappedBy="positionItem")
	@JoinColumn(name="pi_ad_id")
	public Set<Advertise> getAdvertisement() {
		return advertisement;
	}

	public void setAdvertisement(Set<Advertise> advertisement) {
		this.advertisement = advertisement;
	}

	@ManyToOne
	@JoinColumn(name="ps_id")
	public PositionSort getAdPS() {
		return adPS;
	}

	public void setAdPS(PositionSort adPS) {
		this.adPS = adPS;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.TABLE)
	public int getPiId() {
		return piId;
	}

	public void setPiId(int piId) {
		this.piId = piId;
	}

	public String getPiName() {
		return piName;
	}

	public void setPiName(String piName) {
		this.piName = piName;
	}

	public int getPiWidth() {
		return piWidth;
	}

	public void setPiWidth(int piWidth) {
		this.piWidth = piWidth;
	}

	public int getPiHeight() {
		return piHeight;
	}

	public void setPiHeight(int piHeight) {
		this.piHeight = piHeight;
	}

	public String getPiDesc() {
		return piDesc;
	}

	public void setPiDesc(String piDesc) {
		this.piDesc = piDesc;
	}
}
